<template>
  <div class="list">
    <goods v-for="item in reslist" :key="item.id" :item="item" />
  </div>
</template>

<script>
import goods from "../components/Good.vue";
export default {
  data() {
    return {
      value: this.$route.query.value,
      reslist: [],
    };
  },
  created() {
    this.$axios.get("data.json").then((res) => {
      this.reslist = res.data.list.filter((item) => {
        return item.title.includes(this.value);
      });
    });
  },
  methods: {},
  components: {
    goods,
  },
};
</script>

<style lang="scss"></style>
